package NGUYENLAMSON.GIAIPT;

public class MODEL {
	public double giaipt(double a, double b, double c){
		 double delta;
		 double result = 0;
		 delta = b*b - 4*a*c;
		 if ( delta == 0){
		  System.out.println("Nghiem kep x = " + (-b)/2*a);
		 }
		 else if ( delta < 0){
		  System.out.println("Vo nghiem");
		 }
		 else { 
		  System.out.println("x1 = " + (-b + Math.sqrt(delta))/2*a);
		  System.out.println("x2 = " + (-b - Math.sqrt(delta))/2*a);
		 }
		 return result;
		 
		}
		}

